#include <stdio.h>
int main()
{
	int i = 0, num = 0;
	for ( i = 1; i < 101 ;i++ )
	{
		if ( i / 10 == 9 || i % 10 == 9 )
			num++;
	}
	printf("%d", num);

	return 0;
}